package com.zhaoyu.admin.feign.wemedia;

import com.zhaoyu.model.admin.dtos.NewsAuthDto;
import com.zhaoyu.model.common.dtos.ResponseResult;
import com.zhaoyu.model.media.pojos.WmNews;
import com.zhaoyu.model.media.pojos.WmUser;
import com.zhaoyu.model.media.vo.WmNewsCheckVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "leadnews-wemedia")
public interface WemediaFeign {

    @GetMapping("/api/v1/news/findByIdSTL/{id}")
    WmNews findWmNewsByIdSTL(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/news/update")
    ResponseResult updateWmNews(WmNews wmNews);

    @GetMapping("/api/v1/user/findById/{id}")
    WmUser findByIdWmUser(@PathVariable("id") Long id);

    @GetMapping("/api/v1/news/findRelease")
    List<Integer> findRelease();

    @PostMapping("/api/v1/news/findList")
    ResponseResult findListWmNews(@RequestBody NewsAuthDto newsAuthDto);

    @GetMapping("/api/v1/news/findWmNewsCheckVO/{id}")
    WmNewsCheckVO findWmNewsCheckVO(@PathVariable("id") Integer id);

}